package com.excellent.system.domain;

import com.excellent.common.annotation.Excel;
import com.excellent.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 具体周报对象 sys_week_news
 *
 * @author excellent
 * @date 2022-05-05
 */
public class SysWeekNews extends BaseEntity implements Comparable<SysWeekNews>
{
    private static final long serialVersionUID = 1L;

    /** 周报id */
    private Integer id;

    /** 学生学号 */
    @Excel(name = "学生学号")
    private Long stuId;

    /** 老师工号 */
    private Long teaId;

    /** 实践环节 */
    @Excel(name = "实践环节")
    private String task;

    /** 周报内容 */
    @Excel(name = "周报内容")
    private String taskContent;

    /** 周报次数 */
    @Excel(name = "周报次数")
    private Long newNum;

    /** 提交状态 */
    @Excel(name = "提交状态")
    private Integer status;

    /** 提交时间 */
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date makeTima;

    /** 学生姓名 */
    @Excel(name = "学生姓名")
    private String stuName;

    /** 截止时间 */
    @Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deadTime;

    /**
     * 周报学期
     */
    private String taskTerm;

    /**
     * 周报成绩
     */
    @Excel(name = "周报成绩")
    private Integer taskScore;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setStuId(Long stuId)
    {
        this.stuId = stuId;
    }

    public Long getStuId()
    {
        return stuId;
    }
    public void setTeaId(Long teaId)
    {
        this.teaId = teaId;
    }

    public Long getTeaId()
    {
        return teaId;
    }
    public void setTask(String task)
    {
        this.task = task;
    }

    public String getTask()
    {
        return task;
    }
    public void setTaskContent(String taskContent)
    {
        this.taskContent = taskContent;
    }

    public String getTaskContent()
    {
        return taskContent;
    }
    public void setNewNum(Long newNum)
    {
        this.newNum = newNum;
    }

    public Long getNewNum()
    {
        return newNum;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setMakeTima(Date makeTima)
    {
        this.makeTima = makeTima;
    }

    public Date getMakeTima()
    {
        return makeTima;
    }
    public void setStuName(String stuName)
    {
        this.stuName = stuName;
    }

    public String getStuName()
    {
        return stuName;
    }
    public void setDeadTime(Date deadTime)
    {
        this.deadTime = deadTime;
    }

    public Date getDeadTime() {
        return deadTime;
    }

    public String getTaskTerm() {
        return taskTerm;
    }

    public void setTaskTerm(String taskTerm) {
        this.taskTerm = taskTerm;
    }

    public Integer getTaskScore() {
        return taskScore;
    }

    public void setTaskScore(Integer taskScore) {
        this.taskScore = taskScore;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("stuId", getStuId())
                .append("teaId", getTeaId())
                .append("task", getTask())
                .append("taskContent", getTaskContent())
                .append("newNum", getNewNum())
                .append("status", getStatus())
                .append("makeTima", getMakeTima())
                .append("stuName", getStuName())
                .append("deadTime", getDeadTime())
                .append("taskTerm", getTaskTerm())
                .append("taskScore", getTaskScore())
                .toString();
    }

    @Override
    public int compareTo(SysWeekNews o) {
        if (getTask().compareTo(o.getTask()) == 0) {
            return getStuId().compareTo(o.getStuId());
        }
        return getTask().compareTo(o.getTask());
    }
}
